﻿import request from '/@/utils/request';
enum Api {
  AddDeviceErrorCommandLog = '/api/deviceErrorCommandLog/add',
  DeleteDeviceErrorCommandLog = '/api/deviceErrorCommandLog/delete',
  UpdateDeviceErrorCommandLog = '/api/deviceErrorCommandLog/update',
  PageDeviceErrorCommandLog = '/api/deviceErrorCommandLog/page',
  DetailDeviceErrorCommandLog = '/api/deviceErrorCommandLog/detail',
  GetDeviceGateWayGateWayIdDropdown = '/api/deviceErrorCommandLog/DeviceGateWayGateWayIdDropdown',
  GetDeviceInfoDeviceIdDropdown = '/api/deviceErrorCommandLog/DeviceInfoDeviceIdDropdown',
}

// 增加设备运行异常指令日志
export const addDeviceErrorCommandLog = (params?: any) =>
	request({
		url: Api.AddDeviceErrorCommandLog,
		method: 'post',
		data: params,
	});

// 删除设备运行异常指令日志
export const deleteDeviceErrorCommandLog = (params?: any) => 
	request({
			url: Api.DeleteDeviceErrorCommandLog,
			method: 'post',
			data: params,
		});

// 编辑设备运行异常指令日志
export const updateDeviceErrorCommandLog = (params?: any) => 
	request({
			url: Api.UpdateDeviceErrorCommandLog,
			method: 'post',
			data: params,
		});

// 分页查询设备运行异常指令日志
export const pageDeviceErrorCommandLog = (params?: any) => 
	request({
			url: Api.PageDeviceErrorCommandLog,
			method: 'post',
			data: params,
		});

// 详情设备运行异常指令日志
export const detailDeviceErrorCommandLog = (id: any) => 
	request({
			url: Api.DetailDeviceErrorCommandLog,
			method: 'get',
			data: { id },
		});

export const getDeviceGateWayGateWayIdDropdown = () =>
		request({
		url: Api.GetDeviceGateWayGateWayIdDropdown,
		method: 'get'
		});
export const getDeviceInfoDeviceIdDropdown = () =>
		request({
		url: Api.GetDeviceInfoDeviceIdDropdown,
		method: 'get'
		});

